//
//  AddContactViewController.m
//  UIHomeWork17_通讯录
//
//  Created by tusm on 16/8/6.
//  Copyright © 2016年 tusm. All rights reserved.
//

#import "AddContactViewController.h"
#import "ViewController.h"
@interface AddContactViewController ()
@property (nonatomic,strong)NSMutableDictionary *mDictionary;
@end

@implementation AddContactViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    _mDictionary = [NSMutableDictionary dictionary];
}

//- (IBAction)saveValue:(id)sender {
//    
//    [_mDictionary setObject:_addName.text forKey:@"addName"];
//    [_mDictionary setObject:_addName forKey:@"addImage"];
//    [_mDictionary setObject:_addPhone forKey:@"addPhone"];
//    [_mDictionary setObject:_addAddress forKey:@"addAddress"];
//    [self.dataSource passValue:_mDictionary];
//    [self.navigationController popToViewController:[[ViewController alloc] init] animated:YES];
//    
//    
//}

- (IBAction)saveValue:(id)sender {
    
        [_mDictionary setObject:_nameTextField.text forKey:@"addName"];
//        [_mDictionary setObject:_addImage.image forKey:@"addImage"];
        [_mDictionary setObject:_phoneTextField forKey:@"addPhone"];
        [_mDictionary setObject:_addressTextField forKey:@"addAddress"];
        [self.dataSource passValue:_mDictionary];
    
}










- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
